Skip to content

Add xuhua-zheng/siyuan-db-heading-ref-stats#1853

Open
xuhua-zheng wants to merge 3 commits into
siyuan-note:mainfrom
xuhua-zheng:add-heading-ref-sync-plugin
Open

Add xuhua-zheng/siyuan-db-heading-ref-stats#1853
xuhua-zheng wants to merge 3 commits into
siyuan-note:mainfrom
xuhua-zheng:add-heading-ref-sync-plugin

Conversation

@xuhua-zheng

Copy link
Copy Markdown
Contributor

If you are submitting a new bazaar package for the first time, please confirm the following information.

  • The repository is public
  • Include the appropriate open source license file LICENSE
  • Does not involve infringing content, such as non-commercial font files

Package repository: https://github.com/xuhua-zheng/siyuan-db-heading-ref-stats
Release: https://github.com/xuhua-zheng/siyuan-db-heading-ref-stats/releases/tag/v0.1.0
Package asset: https://github.com/xuhua-zheng/siyuan-db-heading-ref-stats/releases/download/v0.1.0/package.zip

@github-actions

github-actions Bot commented May 29, 2026

Copy link
Copy Markdown

Pull Request Check Report

Add 1 Plugin Repo

xuhua-zheng/siyuan-db-heading-ref-stats


@TCOTC TCOTC changed the title Add heading ref sync plugin Add xuhua-zheng/siyuan-db-heading-ref-stats May 29, 2026
@TCOTC TCOTC self-requested a review May 29, 2026 05:43
@TCOTC

TCOTC commented May 29, 2026

Copy link
Copy Markdown
Collaborator

初步审核

以下是 AI 的审核结论,请开发者确认并修复之后回复,然后维护者会进行人工审核。

版本: v0.1.0 (commit: b6fd836)

发现的问题

  • README 中的捐赠二维码图片使用了相对路径,这在思源中可能无法正常显示,未来版本可能会有未定义行为。请将 README.md:55README_zh_CN.md:55 中的 ![...](/plugins/siyuan-db-heading-ref-stats/assets/wechat-pay.png)![...](/plugins/siyuan-db-heading-ref-stats/assets/alipay.jpg) 替换为指向 GitHub raw 内容的绝对 HTTPS 链接。
  • package.zip 中包含不需要的文件:assets/.gitkeep(开发残留文件)、assets/alipay.jpg(144KB)和 assets/wechat-pay.png(151KB),应将 assets/ 目录从打包流程中排除。

需要维护者人工验证

  • 实际安装测试"同步标题引用"和"同步所选标题引用"右键菜单功能是否正常
  • 验证设置界面(名字分隔符、去重开关)的保存和读取
  • 验证所有标题等级(H1-H6)下的同步行为
  • 验证重载/更新插件后设置是否保留
  • 验证卸载后设置数据是否被正确清理
  • 验证在所有声明的前端模式下正常运行(声明了全部前端)

检查通过

  • plugin.json:所有必填字段正确填写(name、version、author、url、minAppVersion、backends、frontends、displayName、description、readme、keywords)
  • plugin.json 中没有 i18n 字段(框架自动加载,正确)
  • displayName/description/readme 的 locale 键(default、zh_CN)使用正确
  • icon.png:6.5KB(小于 100KB 限制)
  • preview.png:45KB(小于 250KB 限制)
  • LICENSE:MIT 协议,版权年份 2026,已包含在仓库中
  • 包内路径分隔符全部使用 /
  • 包内无 node_modules、.git 等无关文件
  • i18n 文件:en_US.json 和 zh_CN.json 内容与对应语言一致
  • 生命周期方法:onload()、onunload()、uninstall() 完整实现
  • 事件总线监听器在 onunload() 中正确移除
  • removeData() 正确放在 uninstall() 中,而非 onunload()
  • 无定时器、MutationObserver、IPC 监听器等需额外清理的资源
  • CSS 类名使用自定义前缀 heading-ref-stats__,无 .plugin-sample 残留
  • 自定义属性使用 custom- 前缀(custom-sy-av-view
  • 所有面向用户的字符串使用 i18n
  • console.debug 使用恰当,仅用于生命周期和降级日志
  • 未使用 window.location.reload()
  • 常量均使用命名常量而非字面量
  • 仓库源码与 package.zip 同步(同一 commit)
  • TypeScript 代码结构清晰,使用接口定义类型

@xuhua-zheng

xuhua-zheng commented May 29, 2026

Copy link
Copy Markdown
Contributor Author

Fixed in v0.1.1.

README QR code images now use GitHub raw HTTPS links. The package no longer contains assets/, assets/.gitkeep, alipay.jpg, or wechat-pay.png.

Latest release: https://github.com/xuhua-zheng/siyuan-db-heading-ref-stats/releases/tag/v0.1.1

I downloaded and verified the release package.zip. It contains only index.js, index.css, plugin.json, README files, i18n files, icon.png, and preview.png. plugin.json version is 0.1.1.

Please continue the review. Thanks.

@TCOTC

TCOTC commented May 29, 2026

Copy link
Copy Markdown
Collaborator
  • 这个改成 true:

    PixPin_2026-05-29_23-18-10

@xuhua-zheng

Copy link
Copy Markdown
Contributor Author

Fixed in v0.1.2.

The reason it still failed was disabledInPublish was still false. I changed plugin.json disabledInPublish to true and bumped plugin.json and package.json to 0.1.2.

Release: https://github.com/xuhua-zheng/siyuan-db-heading-ref-stats/releases/tag/v0.1.2

I downloaded and verified the v0.1.2 package.zip. Its plugin.json has version 0.1.2 and disabledInPublish true.

Please continue the review. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants